package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

/**
 * @ClassName CardTypeEnum
 * @Description: CardTypeEnum
 * @Author ck
 * @Date 2021/12/27
 * @Version V1.0
 **/
@Getter
public enum CardTypeEnum {
    /**
     * 类目改变:findPlateFiancialStatistics
     */
    JG_CARD(1, "军官证"),
    SF_CARD(2, "身份证"),
    HZ_CARD(3, "护照");

    private int code;

    private String desc;

    CardTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static CardTypeEnum getDscByType(Integer type) {
        for (CardTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
